Skip to content

[pull] main from tldraw:main#482

Merged
pull[bot] merged 8 commits intocode:mainfrom
tldraw:main
Apr 4, 2026
Merged

[pull] main from tldraw:main#482
pull[bot] merged 8 commits intocode:mainfrom
tldraw:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 4, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

steveruizok and others added 8 commits April 4, 2026 09:55
In order to keep the release notes current with changes on main since
the v4.5.7 patch release, this PR updates `next.mdx` with new entries,
prunes stale entries for PRs that shipped in v4.5.x patches, and bumps
`last_version` to v4.5.7.

### Change type

- [x] `other`

### Test plan

- [ ] Verified all PR references in `next.mdx` match current PR set from
`main`

### Code changes

| Section       | LOC change  |
| ------------- | ----------- |
| Documentation | +49 / -6    |
…high zoom in dynamic size mode (#8378)

In order to fix visual glitches with sticky notes and geo shapes in
dynamic size mode at high zoom levels, this PR clamps the note shadow
offset and switches both note and geo shape labels to use CSS
`transform: scale()` instead of direct fontSize/padding multiplication.

<img width="455" height="328" alt="image"
src="https://github.com/user-attachments/assets/c8a02fcd-5b26-4cd2-ad71-6be7bf445a75"
/>
<img width="272" height="315" alt="image"
src="https://github.com/user-attachments/assets/976ee4a2-d7f2-4200-a8b3-9a601697a6af"
/>


Closes #8377

### Change type

- [x] `bugfix`

### Test plan

1. Enable dynamic size mode (View menu → Dynamic size mode)
2. Create a sticky note and a geo shape with a text label
3. Zoom to 800%
4. Verify no shadow appears above the sticky note
5. Double-click to edit text in both shapes — verify the caret is
proportionally sized

- [x] Unit tests

### Release notes

- Fix shadow rendering above sticky notes at high zoom in dynamic size
mode
- Fix oversized text caret when editing notes and geo shapes at high
zoom in dynamic size mode

### Code changes

| Section    | LOC change |
| ---------- | ---------- |
| Core code  | +18 / -5   |

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
When nudging shapes with arrow keys, the selection overlay (bounds,
handles, controls) now temporarily hides, matching the existing behavior
when changing styles from the style panel.

This reuses the `isChangingStyle` flag on the instance state, which the
editor automatically resets after 1 second. The
`TldrawSelectionForeground` component already checks this flag to hide
selection bounds, crop handles, and controls.

As a drive-by, this also moves the `isChangingStyle` reset from the
style panel's `onPointerLeave` handler to the select tool's
`onPointerMove` handler. This means any pointer movement over the canvas
will clear the flag, which works for both style changes and nudging
without needing separate reset logic in the style panel.


https://github.com/user-attachments/assets/95145b93-e697-40bb-ac28-80244867c6ab

### Change type

- [x] `improvement`

### Test plan

1. Select one or more shapes on the canvas
2. Press arrow keys to nudge the selection
3. Observe that the selection overlay hides during nudging
4. Move the pointer over the canvas and observe the overlay reappears
immediately
5. Change a style in the style panel, then move the pointer to the
canvas — overlay should reappear

- [x] Unit tests

### Release notes

- Hide selection overlay when nudging shapes with arrow keys.

### Code changes

| Section   | LOC change |
| --------- | ---------- |
| Core code | +5 / -7    |
| Tests     | +36 / -0   |
)

Discovered via a failing sync fuzz test at seed `8090628137862085`. The
test hit a crash in `kickoutOccludedShapes` where `getIndexBetween` was
called with equal index keys (`a >= a`).

During multiplayer sync, two clients can independently assign the same
fractional index to sibling shapes. When `kickoutOccludedShapes` later
tries to compute an insertion index between the old parent and its next
sibling, `getIndexBetween` throws if the sibling's index is equal to or
less than the parent's. The fix falls back to `getIndexAbove` in that
case, which always produces a valid higher index.

Relates to #6141

### Change type

- [x] `bugfix`

### Test plan

- [x] Unit tests

Added seed `8090628137862085` as a regression test in
`syncFuzz.test.ts`.

### Release notes

- Fix a crash in `kickoutOccludedShapes` when shapes have duplicate
fractional indices from sync conflicts.

### Code changes

| Section | LOC change |
| ------- | ---------- |
| Core code | +6 / -2 |
| Tests | +4 / -0 |
In order to allow manually publishing stable releases of the VS Code
extension without waiting for or relying on the automatic push-triggered
pipeline, this PR adds a new `workflow_dispatch`-only GitHub Actions
workflow ("Publish VSCE/OVX") and replaces the stale changelog with a
link to tldraw.dev/releases.

The existing auto-publish workflow on push to main/production is
unchanged.

### Change type

- [x] `improvement`

### Test plan

1. Merge to main
2. Go to Actions > "Publish VSCE/OVX" > "Run workflow"
3. Verify it publishes a stable (non-pre-release) version to the VS Code
Marketplace and Open VSX

### Code changes

| Section        | LOC change  |
| -------------- | ----------- |
| Apps           | +1 / -208  |
| Config/tooling | +52 / -0   |
#8451)

In order to fix the oversized text caret when editing arrow labels at
high zoom in dynamic size mode, this PR applies the same strategy from
#8378 to arrow labels: render text at the base font size and use CSS
`transform: scale()` instead of directly multiplying `fontSize` and
`textWidth` by the shape scale.

Closes #8379

### Change type

- [x] `bugfix`

### Test plan

1. Enable dynamic size mode (View menu → Dynamic size mode)
2. Create an arrow with a text label
3. Zoom to 800%
4. Double-click to edit the arrow label — verify the caret is
proportionally sized

- [ ] Unit tests
- [ ] End to end tests

### Release notes

- Fix oversized text caret when editing arrow labels at high zoom in
dynamic size mode

### Code changes

| Section    | LOC change |
| ---------- | ---------- |
| Core code  | +5 / -3    |
In order to automatically remove unused imports via oxlint (replacing
the previous `prettier-plugin-organize-imports` behavior), this PR bumps
oxlint to v1.58.0 and enables the new `safe-fix` option for import
removal. It also migrates all tsconfig files from `moduleResolution:
"node"` (node10) to `"bundler"`, the modern setting for bundler-based
projects like tldraw.

### What changed

- **oxlint v1.58.0** — adds safe-fix support for import removal
(oxc-project/oxc#20839), so `oxlint --fix` removes unused imports
without `--fix-dangerously`
- **`no-unused-vars` config** — added `"fix": { "imports": "safe-fix",
"variables": "off" }` so only imports are auto-removed
- **`moduleResolution: "bundler"`** — migrated the base tsconfig and 6
other tsconfig files from `"node"` to `"bundler"`. This was required
because `oxlint-tsgolint` 0.18+ (peer dep of oxlint 1.58.0) dropped
support for `moduleResolution: "node10"`
- **oxlint-tsgolint ^0.18.0** — bumped to satisfy oxlint 1.58.0 peer
dependency

Relates to oxc-project/oxc#18301

### Change type

- [x] `improvement`

### Test plan

1. Add unused imports to a `.tsx` file
2. Run `npx oxlint --fix <file>`
3. Verify unused imports are removed and unused variables are left alone
4. Run `yarn typecheck` — passes cleanly
5. Run `yarn lint` — passes with 0 errors

- [ ] Unit tests
- [ ] End to end tests

### Code changes

| Section        | LOC change |
| -------------- | ---------- |
| Config/tooling | +15 / -11  |
…le updates (#8452)

In order to let users make one-off style changes without affecting
defaults for future shapes, this PR adds accelerator key (Cmd on Mac /
Ctrl on Windows/Linux) modifier support to all style panel controls.
When the modifier is held while shapes are selected, the style change
applies only to those shapes and does not update `stylesForNextShape` or
`opacityForNextShape`. Closes #8431.

The implementation checks `editor.inputs.getAccelKey()` directly in
`StylePanelContext`, which provides both `onValueChange` (for styles)
and a new `onOpacityChange` (for opacity). This keeps the modifier logic
centralized — no changes needed in individual picker components.

### Change type

- [x] `feature`

### Test plan

1. Select a shape on the canvas
2. Click a color in the style panel — verify it changes the shape AND
updates the default for new shapes
3. Select another shape, hold Cmd (Mac) / Ctrl (Win/Linux) and click a
different color — verify it changes the shape but new shapes still use
the previous default
4. Test the same with opacity slider, fill, dash, size, font, geo,
arrowhead, and spline pickers
5. Test drag-to-paint (pointer down + drag across items) with Cmd held —
verify modifier is respected throughout the drag

- [ ] Unit tests
- [ ] End to end tests

### Release notes

- Add accelerator key modifier (Cmd on Mac / Ctrl on Windows/Linux) to
style panel items to apply styles to selected shapes only, without
changing the default style for new shapes.

### API changes

- Added `StylePanelContext.onOpacityChange(opacity: number)` —
centralizes opacity change handling with the same modifier-key behavior
as `onValueChange`

### Code changes

| Section         | LOC change |
| --------------- | ---------- |
| Core code       | +43 / -16  |
| Automated files | +2 / -0    |
@pull pull Bot locked and limited conversation to collaborators Apr 4, 2026
@pull pull Bot added the ⤵️ pull label Apr 4, 2026
@pull pull Bot merged commit 2632b5f into code:main Apr 4, 2026
@pull pull Bot had a problem deploying to deploy-production April 4, 2026 15:13 Failure
@pull pull Bot had a problem deploying to vsce publish April 4, 2026 15:13 Failure
@pull pull Bot had a problem deploying to deploy-staging April 4, 2026 15:13 Failure
@pull pull Bot had a problem deploying to deploy-staging April 4, 2026 15:13 Error
@pull pull Bot had a problem deploying to bemo-canary April 4, 2026 15:13 Failure
@pull pull Bot had a problem deploying to deploy-staging April 5, 2026 00:36 Failure
@pull pull Bot temporarily deployed to e2e-dotcom April 5, 2026 02:36 Inactive
@pull pull Bot had a problem deploying to deploy-staging April 6, 2026 00:36 Failure
@pull pull Bot temporarily deployed to e2e-dotcom April 6, 2026 02:36 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants